package com.leaf.spring.y201907.day31;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;

@SpringBootApplication
@EnableBinding(OrderCreateStream.class)
public class AppConfig {

	public static void main(String[] args) {
		SpringApplication.run(AppConfig.class, args);
	}

	@StreamListener(OrderCreateStream.TOPIC)
	public void receive(Object payload) {
		System.out.println("received" + payload);
	}

}
